<?php 
/**************************************************/
## Class Name - Model_CMS (Contains all the functions related cms pages of the project)
## Created By - Techmodi (19/08/2011)
/**************************************************/

class Model_Sitesettings extends Database
{	
	function Model_Sitesettings() {	
		$this->settings = SITE_SETTINGS;
		$this->Database();
	}
	
	## Edit CONFIG value by id
	function editSettingVlaueById($array, $Id){
		$this->UpdateData($this->settings,$array,"settings_id ",$Id,0);
	}
	## fetch the logo
	function getSettingValueById($id) {
		$fields = array();	
		$tables = array($this->settings);
		$result1 = $this->SelectData($fields,$tables, $where= array("settings_id ='".$id."'"), $order = array(), $group=array(),$limit = "",0,0); 
		$result  = $this->FetchRow($result1); 
		return $result;
	}
	
	## List all submenus
	function getSiteSetting($limit='',$offset='') {
		$fields = array();	
		$tables = array($this->settings);
		$result1 = $this->SelectData($fields,$tables, $where= array(), $order = array(), $group=array(),$limit,$offset,0); 
		$result  = $this->FetchAll($result1); 
		return $result;
	}
}
?>


